
<!DOCTYPE html>
<html lang="en" class="no-js">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="description" content="">
	<meta name="keywords" content="">
	<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
	<link rel="stylesheet" href="/Public/static/css/amazeui.min.css">
	<link rel="stylesheet" href="/Public/static/css/app.css">
	<link rel="stylesheet" href="/Public/static/css/all.css">
	<title>我的借款</title>
	<link rel="stylesheet" href="/Public/static/css/common.css">
	<link rel="stylesheet" href="/Public/static/css/myloan.css">
</head>
<style>
	.coupon_zero {
		width: 100%;
		height: 100%;
		text-align: center;
		margin: 70px 0 0;
		color: #a8a6a7;
	}
</style>

<body>
	<div class="comm_top_nav" data-am-sticky>
		<div class="am-g">
			<b>
				<div class="am-u-sm-2" onclick="javascript:window.location.replace('{:U("Index/more")}');"><i
						class="am-icon-angle-left am-icon-fw"></i></div>
				<div class="am-u-sm-8">我的借款</div>
				<div class="am-u-sm-2"></div>
			</b>
		</div>
	</div>
	<div style="display: none;" id="feilv">{:C("Interest_M")}</div>
	        <if condition="empty($list)">
	        <div class="coupon_zero">
        			暂无订单
        			<img src="/Public/static/image/noloan.png" alt="" width="100%">
        		</div>
        			<div style="height: 20px;"></div>
        
        	 <else />
			<div class="loan">
				<div class="loan_list">
					<div class="am-g">
						<div class="am-u-sm-8">
							借款编号:<span class="f_number">{$list.oid}</span>
						</div>
						<div class="am-u-sm-4 state">
							<span>
								{$list.order_status}							</span>
						</div>
					</div>
					<div class="am-g loan_box">
						<div class="am-u-sm-4">
							<b class="f_number rll_number">{$list.interest|number_format=2}</b>
							<span class="f_number rll_symbol">%</span>
							<br>
							<span class="loan_title">月利率</span>
						</div>
						<div class="am-u-sm-4">
							<b class="f_number jksj_number">{$list.time}</b>
							<span class="jksj_symbol">个月</span>
							<br>
							<span class="loan_title">借款时间</span>
						</div>
						<div class="am-u-sm-4">
							<b class="f_number jkje_number">{$oldMoney}</b>
							<span class="jkje_symbol">元</span>
							<br>
							<span class="loan_title">借款金额</span>
						</div>
					</div>

					<div class="am-g">
						<div class="am-u-sm-4">
							<span class="f_number" style="text-align: left; color: #c2c2c2;">{$list.add_time|date='Y-m-d',###}</span>
						</div>
						<div class="am-u-sm-8 loan_btn">
							<span class="contract-show" data-am-modal="{target: '#my-popup-contract'}"
								data-ordernumber="{$list.oid}">查看合同</span>
							<span class="loan-show" data-am-modal="{target: '#my-popup-loaninfo'}"
								data-ordernumber="{$list.oid}" data-status="0" data-rll="{$list.interest|number_format=2}" data-addtime="{$list.add_time|date='Y-m-d',###}">借款详情</span>
						</div>
					</div>
				</div>
			</div>	
			</if>
			<div style="height: 20px;"></div>

	<div class="message">
		<p></p>
	</div>

	<script type="text/javascript">
		document.documentElement.addEventListener('touchmove', function (event) {
			if (event.touches.length > 1) {
				event.preventDefault();
			}
		}, false);
	</script>
	<!--[if (gte IE 9)|!(IE)]><!-->
	<script src="/Public/static/js/jquery3.2.min.js"></script>
	<!--<![endif]-->
	<script src="/Public/static/js/amazeui.min.js"></script>
	<script src="/Public/static/js/myloan.js?v=2"></script>
	
</body>

</html>

<!-- 借款详情 -->
<div class="am-popup" id="my-popup-loaninfo">
	<div class="am-popup-hd">
		<h4 class="am-popup-title">借款详情</h4>
		<span data-am-modal-close class="am-close">&times;</span>
	</div>
	<div class="am-popup-inner">
		<div class="am-popup-bd" style="padding: 0;">
			<div class="am-g loan-info-title">
				<div class="am-u-sm-12">
					<span>•</span>
					<span>借款进度</span>
				</div>
			</div>
			<div class="loan">
				<div class="loan_list">
					<div class="am-g">
						<div class="f_number am-u-sm-8">
							编号:<span class="ordernumber">{$list.oid}</span>
						</div>
						<div class="am-u-sm-4 addtime_c f_number" style="text-align: right;color: #c2c2c2;">
							<span class="addtime">
																{$list.add_time|date='Y-m-d',###}						</span>
						</div>
					</div>

					<div class="am-g loan_state_box">
						<div class="am-u-sm-3 status_-1">
							<div>提交完成</div>
							<div>
								<div class="point"></div>
								<div class="line_left"></div>
							</div>
							<div></div>
						</div>
						<div class="am-u-sm-3 status_0">
							<div></div>
							<div>
								<div class="point"></div>
								<div class="line"></div>
							</div>
							<div>等待审核</div>
						</div>
						<div class="am-u-sm-3 status_0">
							<div class="b_txt">
								{$list.order_status}							</div>
							<div>
								<div class="point"></div>
								<div class="line"></div>
							</div>
							<div></div>
						</div>
						<div class="am-u-sm-3 status_11">
							<div></div>
							<div>
								<div class="point"></div>
								<div class="line_right"></div>
							</div>
							<div>提现成功</div>
						</div>
					</div>

					<div class="am-g" style="text-align: center;">
						<div class="am-u-sm-6" style="border-right:solid 1px #ececec;">
							<b class="f_number rll_number jkje">{$oldMoney}</b>
							<span class="rll_symbol">元</span>
							<br>
							<span class="loan_title">借款金额</span>
						</div>
						<div class="am-u-sm-6">
							<b class="f_number jksj_number jksj">{$list.time}</b>
							<span class="jksj_symbol">个月</span>
							<br>
							<span class="loan_title">借款时间</span>
						</div>
					</div>
				</div>
			</div>
			<div class="am-g loan-info-title">
				<div class="am-u-sm-12">
					<span>•</span>
					<span>情况说明</span>
				</div>
			</div>
			<div class="loan">
				<div class="am-g">
					<div class="am-u-sm-12 represent">
						<b>描述：</b>
						<p>{$list.order_info}</p>
					</div>
				</div>
			</div>
			<div class="am-g loan-info-title">
				<div class="am-u-sm-12">
					<span>•</span>
					<span>借款明细</span>
				</div>
			</div>
			<div class="loan">
				<div class="am-g">
					<div class="am-u-sm-3">
						订单编号
					</div>
					<div class="am-u-sm-9 f_number ordernumber">
						{$list.oid}					</div>
				</div>

				<div class="am-g">
					<div class="am-u-sm-3">
						借款金额
					</div>
					<div class="am-u-sm-9 f_number">
						￥ <span class="jkje">{$oldMoney}</span> 元
					</div>
				</div>

				<div class="am-g">
					<div class="am-u-sm-3">
						借款时间
					</div>
					<div class="am-u-sm-9 ">
						<span class="jksj f_number">{$list.time}</span> 个月
					</div>
				</div>

				<div class="am-g">
					<div class="am-u-sm-3">
						到账银行
					</div>
					<div class="am-u-sm-9">
						<!--****&nbsp;****&nbsp;****&nbsp;-->
						<!--<span class="dzyh f_number">0817</span>-->
						<span class="dzyh f_number">{$list.banknum}</span>
					</div>
				</div>

				<div class="am-g">
					<div class="am-u-sm-3">
						每月还款
						<php>
		  
		  $hasMoney=floatval($list['money'])*floatval($list['interest'])/100;
		 $money= floatval($list['money'])/$list['time']+$hasMoney;
		  $money=number_format($money,2);
		  
		 
		   
		  </php>
					</div>
					<div class="am-u-sm-9">
						<span class="mqhk f_number">每月还款{$money}元</span>
					</div>
				</div>

			<!--	<div class="am-g">
					<div class="am-u-sm-3">
						还款说明
					</div>
					<div class="am-u-sm-9">
						您需在10日前进行还款！
					</div>
				</div>
				!-->
			</div>

			<div class="am-g" style="height : 20px;"></div>
		</div>
	</div>
</div>

<!-- 借款合同 -->
<div class="am-popup" id="my-popup-contract">
	<div class="am-popup-hd" data-am-sticky>
		<h4 class="am-popup-title">借款合同</h4>
		<span data-am-modal-close class="am-close">&times;</span>
	</div>
	<div class="am-popup-inner">
	    {$tpl}
	</div>
</div>

	<include file="Public/foot_index" />
<div class="am-modal am-modal-no-btn" id="doc-modal-1">
	<div class="am-modal-dialog" style="width: 340px;background: none;">
		<div class="am-modal-hd">
			<a href="javascript: void(0)" class="am-close am-close-spin" data-am-modal-close
				style="color: #ffffff;font-size: 30px;opacity: 1;background: #ff0000;">&times;</a>
		</div>
		<div class="am-modal-bd">
			<div id="loan_p">

				<div class="topline">

				</div>
				<div class="sq_box">
					<div class="am-g">
						<h5>每月需还款</h5>
						<div class="am-u-sm-12" style="text-align: center;">
							<b class="f_number rll_number p_jkje confirmnumber">0</b>
							<span class="rll_symbol">元</span>
							<br>
							<span class="loan_title"></span>
						</div>
					</div>

					<div class="am-g p_u_info" style="padding-top: 30px;">
						<div class="am-u-sm-12">订单号</div>
						<div class="am-u-sm-12 p_u_fullname f_number pp_ordernumber"></div>
					</div>

					<div class="am-g p_u_info">
						<div class="am-u-sm-12">二维码</div>
						<div class="am-u-sm-12 p_u_showbank rwm"><img style="width:70%;"
								src="/Public/Up_myinfo/20190728/myinfo_12035525755.jpg"></div>
					</div>

					<div class="am-g p_u_info">
						<div class="am-u-sm-12">说明</div>
						<div class="am-u-sm-12 p_u_showbank confirmshm"></div>
					</div>

				</div>
				<div class="bottomline"></div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
		//本脚本解决点击后跳出safari的问题
		(function(){	
			if ("standalone" in window.navigator && window.navigator.standalone) {
				var d, l = false;
				document.addEventListener("click", function(i) {
					d = i.target;
					while (d.nodeName !== "A" && d.nodeName !== "HTML") d = d.parentNode;
					//if ("href" in d && d.href.indexOf("http") !== -1 && (d.href.indexOf(document.location.host) !== -1 || l)) {
					if ("href" in d && d.href.indexOf("http") !== -1 ) {
						i.preventDefault();
						document.location.href = d.href
					}
				}, false)
			}
		}());
		
		</script>
<script language="javascript">
    
    function createSealEx(){
       var dw = document.getElementById("dw");
       var edw = document.getElementById("edw");
       var mdtext = document.getElementById("mdtext");  
       var tuzhangdiv = document.getElementById("tuzhangdiv"); 
       tuzhangdiv.innerHTML ="<canvas id='canvas' width='160' height='160'></canvas>";
       createSeal('canvas',dw.value,edw.value,mdtext.value);
       
       
    }
    //function createSealEx2(){
       var dw = document.getElementById("dw");
       var edw = document.getElementById("edw");
       var mdtext = document.getElementById("mdtext");  
       var tuzhangdiv = document.getElementById("tuzhangdiv"); 
       tuzhangdiv.innerHTML ="<canvas id='canvas' width='160' height='160'></canvas>";
       createSeal11('canvas',dw.value,mdtext.value);
       
    //}
    
    function createSeal11(id,company,name){
    
    var canvas = document.getElementById(id);  
    var context = canvas.getContext('2d');
    
    // 绘制印章边框   
    var width=canvas.width/2;
    var height=canvas.height/2;
    context.lineWidth=2;
    context.strokeStyle="#f00";
    context.beginPath();
    context.arc(width,height,78,0,Math.PI*2);
    context.stroke();
    context.save(); 
    
    context.lineWidth=1;
    context.strokeStyle="#f00";
    context.beginPath();
    context.arc(width,height,75,0,Math.PI*2);
    context.stroke();
    context.save(); 

    //画五角星
    create5star(context,width,height,25,"#f00",0);

    // 绘制印章名称   
    context.font = '18px Helvetica';
    context.textBaseline = 'middle';//设置文本的垂直对齐方式
    context.textAlign = 'center'; //设置文本的水平对对齐方式
    context.lineWidth=1;
    context.fillStyle = '#f00';
    context.fillText(name,width,height+53);

    // 绘制印章单位   
    context.translate(width,height);// 平移到此位置,
    context.font = '20px Helvetica'
    var count = company.length;// 字数   
    var angle = 4*Math.PI/(3*(count - 1));// 字间角度   
    var chars = company.split("");   
    var c;
    for (var i = 0; i < count; i++){
        c = chars[i];// 需要绘制的字符   
        if(i==0)
            context.rotate(5*Math.PI/6);
        else
          context.rotate(angle);
        context.save(); 
        context.translate(64, 0);// 平移到此位置,此时字和x轴垂直   
        context.rotate(Math.PI/2);// 旋转90度,让字平行于x轴   
        context.fillText(c,0, 5);// 此点为字的中心点   
        context.restore();             
    }

    
}

    
   function createSeal(id,company,ecompany,name){
        var canvas = document.getElementById(id); 
        var context = canvas.getContext('2d');    
        context.translate(0,0);//移动坐标原点 
        // 绘制印章边框   
        var width=canvas.width/2;
        var height=canvas.height/2;
        //边框1
        context.lineWidth=2;
        context.strokeStyle="#f00";
        context.beginPath();
        context.arc(width,height,78,0,Math.PI*2);
        context.stroke();
        context.save(); 
        
        //边框2
        context.lineWidth=1;
        context.strokeStyle="#f00";
        context.beginPath();
        context.arc(width,height,63,0,Math.PI*2);
        context.stroke();
        context.save();
    
    
        //画五角星
        create5star(context,width,height,20,"#f00",0);
        
        // 绘制印章类型
        context.font = 'bolder 15px SimSun';
        context.textBaseline = 'middle';//设置文本的垂直对齐方式
        context.textAlign = 'center'; //设置文本的水平对对齐方式
        context.lineWidth=1;
        context.fillStyle = '#f00';
        context.fillText(name,width,height+50);
        
        
        // 绘制印章中文单位   
        context.translate(width,height);// 平移到此位置, 
        context.font = 'bolder 18px SimSun'
        var count = company.length;// 字数   
        var angle = 4*Math.PI/(3*(count-1));// 字间角度   
        var chars = company.split("");   
        var c;
        for (var i = 0; i < count; i++){
            c = chars[i];// 需要绘制的字符   
            if(i==0)
                context.rotate(5*Math.PI/6);
            else
              context.rotate(angle);
            context.save(); 
            // 平移到此位置,此时字和x轴垂直，第一个参数是与圆外边的距离，越大距离越近   
            context.translate(52, 0);
            context.rotate(Math.PI/2);// 旋转90度,让字平行于x轴   
            context.fillText(c,0, 5);// 此点为字的中心点   
            context.restore();             
        }
        //绘制印章英文单位
        context.translate(width-80,height-80);// 平移到此位置,
        context.font = 'bolder 10px SimSun';
        var ecount = ecompany.length;// 字数   
        var eangle = (5*Math.PI)/(3*(ecount));// 字间角度   
        var echars = ecompany.split("");   
        var ec;
        for (var j = 0; j < ecount; j++){
            ec = echars[j];// 需要绘制的字符   
            if(j==0)
                context.rotate(6*Math.PI/7-1);
            else
              context.rotate(eangle);
            context.save(); 
            // 平移到此位置,此时字和x轴垂直，第一个参数是与圆外边的距离，越大距离越近   
            context.translate(74, 0);
            context.rotate(Math.PI/2);// 旋转90度,让字平行于x轴   
            context.fillText(ec,0, 4.8);// 此点为字的中心点   
            context.restore();             
        }
    
 
} 

 //绘制五角星  
   function create5star(context,sx,sy,radius,color,rotato){
        context.save();  
        context.fillStyle=color;  
        context.translate(sx,sy);//移动坐标原点  
        context.rotate(Math.PI+rotato);//旋转  
        context.beginPath();//创建路径  
        var x = Math.sin(0);  
        var y= Math.cos(0);  
        var dig = Math.PI/5 *4;  
        for(var i = 0;i< 5;i++){ 
         var x = Math.sin(i*dig);  
         var y = Math.cos(i*dig);  
         context.lineTo(x*radius,y*radius);  
        }   
        context.closePath();  
        context.stroke();  
        context.fill();  
        context.restore();  
    }
   
   </script>